]> granicus.if.org Git - libvpx/commitdiff
vp9 screen: Update motion search offset when set to NSTEP.
authorJerome Jiang <jianj@google.com>
Wed, 5 Dec 2018 02:37:02 +0000 (18:37 -0800)
committerJerome Jiang <jianj@google.com>
Sat, 8 Dec 2018 05:33:49 +0000 (21:33 -0800)
Search method and step parameter might be changed in speed settings.
In this case, we should update the search area offset due to the change
of search method.

Change-Id: I51dc584bbf35e998757da326355dd4b8a4d0093f

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

index a73185623058a6cd80b0390780321be0da601363..7d75bc7b7a908e1c340164212fa1766fd0e444eb 100644 (file)
@@ -3873,6 +3873,9 @@ static int encode_without_recode_loop(VP9_COMP *cpi, size_t *size,
   set_size_independent_vars(cpi);
   set_size_dependent_vars(cpi, &q, &bottom_index, &top_index);
 
+  // search method and step parameter might be changed in speed settings.
+  init_motion_estimation(cpi);
+
   if (cpi->sf.copy_partition_flag) alloc_copy_partition_data(cpi);
 
   if (cpi->sf.svc_use_lowres_part &&
index 9b6c69a73fdfd954a441a6c827c4fc1d0c49bd1c..4e01cc31fb83b6c6cd5fd27841f404a9a7a574a2 100644 (file)
@@ -797,18 +797,11 @@ static void set_rt_speed_feature_framesize_independent(
   }
   // Special case for screen content: increase motion search on base spatial
   // layer when high motion is detected or previous SL0 frame was dropped.
-  // Avoid speed 5 for as there is an issue with SVC datarate test.
-  // TODO(marpan/jianj): Investigate issue at speed 5.
-  if (cpi->oxcf.content == VP9E_CONTENT_SCREEN && cpi->oxcf.speed > 5 &&
+  if (cpi->oxcf.content == VP9E_CONTENT_SCREEN && cpi->oxcf.speed >= 5 &&
       cpi->svc.spatial_layer_id == 0 &&
       (cpi->rc.high_num_blocks_with_motion || cpi->svc.last_layer_dropped[0])) {
     sf->mv.search_method = NSTEP;
     sf->mv.fullpel_search_step_param = 2;
-    // TODO(marpan/jianj): Investigate issue for lower setting of step_param
-    // for spatial layers (namely on lower layers).
-    if (cpi->use_svc && cm->width != cpi->oxcf.width &&
-        cm->height != cpi->oxcf.height)
-      sf->mv.fullpel_search_step_param = 4;
   }
 }