ref: bb071af390bc60c0d540dac441c7f519404b81cf
parent: af4cd92629d039e06a68cf3fc6cdbbf4cfcfd05a
author: Yunqing Wang <yunqingwang@google.com>
date: Tue Oct 23 08:30:13 EDT 2018
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
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -763,11 +763,14 @@
// 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;
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -247,6 +247,7 @@
USE_2_TAPS = 0,
USE_4_TAPS,
USE_8_TAPS,
+ USE_8_TAPS_SHARP,
} SUBPEL_SEARCH_TYPE;
typedef struct SPEED_FEATURES {
--- a/vp9/encoder/vp9_temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -428,8 +428,8 @@
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;