ref: 545bd0ca0e0c92383c159dfbfda300d28fb4ca05
parent: dbcb89be244e03074ee80e7bc6d5c22e6fc5dd79
author: Hui Su <huisu@google.com>
date: Mon Aug 27 13:32:05 EDT 2018
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
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3144,7 +3144,8 @@
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);