]> granicus.if.org Git - libvpx/commitdiff
Use 8-tap interp filter in temporal filtering
authorYunqing Wang <yunqingwang@google.com>
Tue, 23 Oct 2018 19:30:13 +0000 (12:30 -0700)
committerYunqing Wang <yunqingwang@google.com>
Tue, 23 Oct 2018 19:34:56 +0000 (12:34 -0700)
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

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

index 0f9051bb76aa469bb3409adb36e337803988b028..4962516222bd5afbeda6a01ab08c72d8a954d727 100644 (file)
@@ -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;
index 0067bb4ac2c88ded3643759b83babb1afdb90a0f..02673e602002644cf1622a3ea6e9618330311613 100644 (file)
@@ -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 {
index f9a1af5f4acb82f39523c8872559b402cc3378f6..5333e4cd4d2a841f15606a0f97c6f0659d2ecd0e 100644 (file)
@@ -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;