shithub: libvpx

Download patch

ref: 8ed23d5f7fd1a003ecd1eb543f3a662772306155
parent: 2392fe53ab3033fe5c679514dce448f55843fd51
author: Hui Su <huisu@google.com>
date: Tue Dec 15 17:40:09 EST 2020

First pass: skip motion search for intra-only

BUG=webm:1713

Change-Id: Ibad79cf5d12aa913e8c87a31d7d2124c00958691

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1081,8 +1081,8 @@
     x->mv_limits.col_max =
         ((cm->mb_cols - 1 - mb_col) * 16) + BORDER_MV_PIXELS_B16;
 
-    // Other than for the first frame do a motion search.
-    if (cm->current_video_frame > 0) {
+    // Other than for intra-only frame do a motion search.
+    if (!frame_is_intra_only(cm)) {
       int tmp_err, motion_error, this_motion_error, raw_motion_error;
       // Assume 0,0 motion with no mv overhead.
       MV mv = { 0, 0 }, tmp_mv = { 0, 0 };