From 8a927a1b7a6cad191e842fd51431a3a7d2fb0698 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Thu, 26 Mar 2015 17:08:35 -0700 Subject: [PATCH] Reuse inter prediction pixel block for Hadamard transform It saves one unnecessary motion compensated prediction constructed by using 8-tap filter. Change-Id: I101215131e6f38621d5935885f94cc74de6a5377 --- vp9/encoder/vp9_pickmode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 9a49484ab..14484328a 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -1050,6 +1050,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, var_y = pf_var[best_filter]; sse_y = pf_sse[best_filter]; x->skip_txfm[0] = skip_txfm; + if (reuse_inter_pred) { + pd->dst.buf = this_mode_pred->data; + pd->dst.stride = this_mode_pred->stride; + } } else { mbmi->interp_filter = (filter_ref == SWITCHABLE) ? EIGHTTAP : filter_ref; vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize); @@ -1075,7 +1079,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, // this_rdc.dist += uv_dist; // } - vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize); block_yrd(cpi, x, &this_rdc.rate, &this_rdc.dist, &is_skippable, &this_sse, 0, bsize, mbmi->tx_size); x->skip_txfm[0] = is_skippable; -- 2.40.0