Remove dependency of intra mode search skip check on mode order
authorJingning Han <jingning@google.com>
Tue, 9 Sep 2014 19:30:47 +0000 (12:30 -0700)
committerJingning Han <jingning@google.com>
Tue, 9 Sep 2014 19:30:47 +0000 (12:30 -0700)
This commit refactors the vp9_rd_pick_inter_mode_sb function to
remove the intra mode early termination dependency on the mode
search order.

Change-Id: If6ac49aa7c530c7b9a5bd31b0ab84db83e192bec

vp9/encoder/vp9_rdopt.c

index c718ccf..22505fb 100644 (file)
@@ -2674,14 +2674,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
     }
   }
 
-  if (bsize > cpi->sf.max_intra_bsize) {
-    const int all_intra_modes = (1 << THR_DC) | (1 << THR_TM) |
-        (1 << THR_H_PRED) | (1 << THR_V_PRED) | (1 << THR_D135_PRED) |
-        (1 << THR_D207_PRED) | (1 << THR_D153_PRED) | (1 << THR_D63_PRED) |
-        (1 << THR_D117_PRED) | (1 << THR_D45_PRED);
-    mode_skip_mask |= all_intra_modes;
-  }
-
   for (mode_index = 0; mode_index < MAX_MODES; ++mode_index) {
     int mode_excluded = 0;
     int64_t this_rd = INT64_MAX;
@@ -2730,6 +2722,10 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
         continue;
     }
 
+    if (bsize > cpi->sf.max_intra_bsize)
+      if (ref_frame == INTRA_FRAME)
+        continue;
+
     if (mode_skip_mask & (1 << mode_index))
       continue;