From: Yunqing Wang Date: Tue, 23 Oct 2018 19:30:13 +0000 (-0700) Subject: Use 8-tap interp filter in temporal filtering X-Git-Tag: v1.8.0~214^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb071af390bc60c0d540dac441c7f519404b81cf;p=libvpx Use 8-tap interp filter in temporal filtering Used 8-tap interp filter in temporal filtering to achieve more accurate motion search result. Using 8-tap sharp gave slight better result than using 8-tap regular. Speed 0 borg test showed that avg_psnr: ovr_psnr: ssim: hdres: -0.160 -0.157 -0.173 midres: -0.083 -0.061 -0.183 lowres: -0.077 -0.099 -0.204 Speed test didn't see noticeable encoder time changes. Change-Id: I97dc3c4864b5a5675a6c1e3952799b81eedd7d93 --- diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index 0f9051bb7..496251622 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -763,11 +763,14 @@ uint32_t vp9_find_best_sub_pixel_tree( // TODO(yunqing): need to add 4-tap filter optimization to speed up the // encoder. - const InterpKernel *kernel = (use_accurate_subpel_search > 0) - ? ((use_accurate_subpel_search == USE_4_TAPS) - ? vp9_filter_kernels[FOURTAP] - : vp9_filter_kernels[EIGHTTAP]) - : vp9_filter_kernels[BILINEAR]; + const InterpKernel *kernel = + (use_accurate_subpel_search > 0) + ? ((use_accurate_subpel_search == USE_4_TAPS) + ? vp9_filter_kernels[FOURTAP] + : ((use_accurate_subpel_search == USE_8_TAPS) + ? vp9_filter_kernels[EIGHTTAP] + : vp9_filter_kernels[EIGHTTAP_SHARP])) + : vp9_filter_kernels[BILINEAR]; vp9_set_subpel_mv_search_range(&subpel_mv_limits, &x->mv_limits, ref_mv); minc = subpel_mv_limits.col_min; diff --git a/vp9/encoder/vp9_speed_features.h b/vp9/encoder/vp9_speed_features.h index 0067bb4ac..02673e602 100644 --- a/vp9/encoder/vp9_speed_features.h +++ b/vp9/encoder/vp9_speed_features.h @@ -247,6 +247,7 @@ typedef enum { USE_2_TAPS = 0, USE_4_TAPS, USE_8_TAPS, + USE_8_TAPS_SHARP, } SUBPEL_SEARCH_TYPE; typedef struct SPEED_FEATURES { diff --git a/vp9/encoder/vp9_temporal_filter.c b/vp9/encoder/vp9_temporal_filter.c index f9a1af5f4..5333e4cd4 100644 --- a/vp9/encoder/vp9_temporal_filter.c +++ b/vp9/encoder/vp9_temporal_filter.c @@ -428,8 +428,8 @@ static uint32_t temporal_filter_find_matching_mb_c(VP9_COMP *cpi, bestsme = cpi->find_fractional_mv_step( x, ref_mv, &best_ref_mv1, cpi->common.allow_high_precision_mv, x->errorperbit, &cpi->fn_ptr[BLOCK_16X16], 0, mv_sf->subpel_search_level, - cond_cost_list(cpi, cost_list), NULL, NULL, &distortion, &sse, NULL, 0, 0, - USE_2_TAPS); + cond_cost_list(cpi, cost_list), NULL, NULL, &distortion, &sse, NULL, 16, + 16, USE_8_TAPS_SHARP); // Restore input state x->plane[0].src = src;