]> granicus.if.org Git - libvpx/commitdiff
Change temporal filter's search_method on speed 1
authorchiyotsai <chiyotsai@google.com>
Thu, 17 Jan 2019 22:15:00 +0000 (14:15 -0800)
committerchiyotsai <chiyotsai@google.com>
Sat, 19 Jan 2019 02:05:59 +0000 (18:05 -0800)
This commit introduces a new speed feature that determines the
SEARCH_METHOD used by temporal filter when doing 16x16 block on
full_pixel_motion_search. On speed 0, the most exhaustive method MESH is
used. On speed 1 and above, a faster method NSTEP is used.

Performance:
        | AVG_PSNR | AVG_SPDUP | AVG_SPDUP:AVG_PSNR
 MISRES |  0.007%  |   2.818%  |        402:1
  HDRES |  0.004%  |   4.897%  |       1224:1

In the case of midres, there is a small quality gain of -0.021% on
OVR_PSNR.

Performance measurement is done on speed 1 with auto_alt_ref=1.
Quality is measured on full midres set over 60 frames. Speed is measured
on 5 midres clips over 4 bitrates over 30 frames.

STATS_CHANGED

Change-Id: Ic1879d2237f8734529e194767a6cf5e43e20b47b

vp9/encoder/vp9_speed_features.c
vp9/encoder/vp9_speed_features.h
vp9/encoder/vp9_temporal_filter.c

index 5aede927b9f4d1eb951a53cdb1b177e4399fbd8e..50e25c35c63906469612c1685be4df7aba225db5 100644 (file)
@@ -237,6 +237,7 @@ static void set_good_speed_feature_framesize_independent(VP9_COMP *cpi,
   }
 
   if (speed >= 1) {
+    sf->temporal_filter_search_method = NSTEP;
     sf->ml_var_partition_pruning = !boosted;
     sf->ml_prune_rect_partition_threhold[1] = 200;
     sf->ml_prune_rect_partition_threhold[2] = 200;
@@ -906,6 +907,7 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
   sf->allow_acl = 1;
   sf->enable_tpl_model = oxcf->enable_tpl_model;
   sf->prune_ref_frame_for_rect_partitions = 0;
+  sf->temporal_filter_search_method = MESH;
 
   for (i = 0; i < TX_SIZES; i++) {
     sf->intra_y_mode_mask[i] = INTRA_ALL;
index 9b09ec4748eeee0d1dcf633269a5eff3b9d55033..98f8de81d37450137e07ae2053625a03435a9dc3 100644 (file)
@@ -595,6 +595,9 @@ typedef struct SPEED_FEATURES {
   // Allow sub-pixel search to use interpolation filters with different taps in
   // order to achieve accurate motion search result.
   SUBPEL_SEARCH_TYPE use_accurate_subpel_search;
+
+  // Search method used by temporal filtering in full_pixel_motion_search.
+  SEARCH_METHODS temporal_filter_search_method;
 } SPEED_FEATURES;
 
 struct VP9_COMP;
index 23943bb18acc46dde70175ec2ff452c88bf1a5f7..7d270135565068ca2889a30a0b5de91b974987aa 100644 (file)
@@ -501,6 +501,7 @@ static uint32_t temporal_filter_find_matching_mb_c(
   MACROBLOCKD *const xd = &x->e_mbd;
   MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv;
   const SEARCH_METHODS search_method = MESH;
+  const SEARCH_METHODS search_method_16 = cpi->sf.temporal_filter_search_method;
   int step_param;
   int sadpb = x->sadperbit16;
   uint32_t bestsme = UINT_MAX;
@@ -563,7 +564,7 @@ static uint32_t temporal_filter_find_matching_mb_c(
 
       vp9_set_mv_search_range(&x->mv_limits, &best_ref_mv1);
       vp9_full_pixel_search(cpi, x, TF_SUB_BLOCK, &best_ref_mv1_full,
-                            step_param, search_method, sadpb,
+                            step_param, search_method_16, sadpb,
                             cond_cost_list(cpi, cost_list), &best_ref_mv1,
                             &blk_mvs[k], 0, 0);
       /* restore UMV window */