From 545bd0ca0e0c92383c159dfbfda300d28fb4ca05 Mon Sep 17 00:00:00 2001 From: Hui Su Date: Mon, 27 Aug 2018 17:32:05 -0700 Subject: [PATCH] Skip unnecessary motion search If a ref frame is masked out, we do not need to do motion search for it. It makes speed 0 a little faster. Change-Id: I68f71255b2798b24fd1d5b28ed24a2ef87251413 --- vp9/encoder/vp9_rdopt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index cf4b5d033..2830b0793 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3144,7 +3144,8 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, TileDataEnc *tile_data, for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) { x->pred_mv_sad[ref_frame] = INT_MAX; - if (cpi->ref_frame_flags & flag_list[ref_frame]) { + if ((cpi->ref_frame_flags & flag_list[ref_frame]) && + !(is_rect_partition && (ctx->skip_ref_frame_mask & (1 << ref_frame)))) { assert(get_ref_frame_buffer(cpi, ref_frame) != NULL); setup_buffer_inter(cpi, x, ref_frame, bsize, mi_row, mi_col, frame_mv[NEARESTMV], frame_mv[NEARMV], yv12_mb); -- 2.40.0