ref: f4b7004967c586fe0dbef5de09f08a2c800ce7b5
parent: 5cbd333f3b491f6ecb41387acf72e8ec27d8a474
author: chiyotsai <chiyotsai@google.com>
date: Thu Jan 17 09:15:00 EST 2019
Change temporal filter's search_method on speed 1 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
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -237,6 +237,7 @@
}
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 @@
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;
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -595,6 +595,9 @@
// 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;
--- a/vp9/encoder/vp9_temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -501,6 +501,7 @@
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 @@
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 */