ref: bc37fc0fec0390357a50bf4d05b29d6982d0b680
parent: 4c7e8b55a6a68cd7968966c67c0135faf7cea9d9
author: Hui Su <huisu@google.com>
date: Fri Aug 3 08:49:29 EDT 2018
Remove unnecessary calls to load_pred_mv() This improves compression performance slightly: Speed 1: avg_psnr ovr_psnr ssim lowres -0.03% -0.03% -0.05% midres -0.16% -0.20% -0.30% hdres -0.13% -0.13% -0.16% Speed 2: avg_psnr ovr_psnr ssim lowres -0.02% -0.02% -0.03% midres -0.08% -0.06% -0.10% hdres -0.08% -0.08% -0.10% Change-Id: Id357c1f98042f3c7af56f99e534bc81ea9a7cf36
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3978,6 +3978,7 @@
// the starting point of motion search in the following partition type check.
if (do_split || must_split) {
subsize = get_subsize(bsize, PARTITION_SPLIT);
+ if (cpi->sf.adaptive_motion_search) load_pred_mv(x, ctx);
if (bsize == BLOCK_8X8) {
i = 4;
if (cpi->sf.adaptive_pred_interp_filter && partition_none_allowed)
@@ -4005,8 +4006,6 @@
if (mi_row + y_idx >= cm->mi_rows || mi_col + x_idx >= cm->mi_cols)
continue;
- if (cpi->sf.adaptive_motion_search) load_pred_mv(x, ctx);
-
pc_tree->split[i]->index = i;
if (cpi->sf.prune_ref_frame_for_rect_partitions)
pc_tree->split[i]->none.rate = INT_MAX;
@@ -4109,8 +4108,6 @@
PICK_MODE_CONTEXT *ctx = &pc_tree->horizontal[0];
update_state(cpi, td, ctx, mi_row, mi_col, subsize, 0);
encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize, ctx);
-
- if (cpi->sf.adaptive_motion_search) load_pred_mv(x, ctx);
if (cpi->sf.adaptive_pred_interp_filter && bsize == BLOCK_8X8 &&
partition_none_allowed)
pc_tree->horizontal[1].pred_interp_filter = pred_interp_filter;
@@ -4160,8 +4157,6 @@
update_state(cpi, td, &pc_tree->vertical[0], mi_row, mi_col, subsize, 0);
encode_superblock(cpi, td, tp, 0, mi_row, mi_col, subsize,
&pc_tree->vertical[0]);
-
- if (cpi->sf.adaptive_motion_search) load_pred_mv(x, ctx);
if (cpi->sf.adaptive_pred_interp_filter && bsize == BLOCK_8X8 &&
partition_none_allowed)
pc_tree->vertical[1].pred_interp_filter = pred_interp_filter;