]> granicus.if.org Git - libvpx/commitdiff
change to not force interp_type as SWITCHABLE
authorYaowu Xu <yaowu@google.com>
Mon, 30 Jun 2014 19:48:21 +0000 (12:48 -0700)
committerYaowu Xu <yaowu@google.com>
Mon, 30 Jun 2014 19:48:21 +0000 (12:48 -0700)
Encoder still uses SWITCHABLE as default via DEFAULT_INTERP_FILTER,
but does not override the default if it is not SWITCHABLE.

Change-Id: I3c0f6653bd228381a623a026c66599b0a87d01d5

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_pickmode.c

index d413551360624f575cad2520f0e2c31c0ec69e58..0fb991d169d6197022d28f0b5a9e7f313f5db0c7 100644 (file)
@@ -3275,7 +3275,6 @@ void vp9_encode_frame(VP9_COMP *cpi) {
     }
   } else {
     cm->reference_mode = SINGLE_REFERENCE;
-    cm->interp_filter = SWITCHABLE;
     encode_frame_internal(cpi);
   }
 }
index d5a0fcde467095a920895f48c97b2a3b57052411..87e685be792da9f8e95a75be8a32225562e4e2ac 100644 (file)
@@ -333,10 +333,10 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
   const int *const rd_thresh_freq_fact = cpi->rd.thresh_freq_fact[bsize];
   // Mode index conversion form THR_MODES to PREDICTION_MODE for a ref frame.
   int mode_idx[MB_MODE_COUNT] = {0};
-  INTERP_FILTER filter_ref = SWITCHABLE;
+  INTERP_FILTER filter_ref = cm->interp_filter;
   int bsl = mi_width_log2_lookup[bsize];
-  const int pred_filter_search = (((mi_row + mi_col) >> bsl) +
-                                      get_chessboard_index(cm)) % 2;
+  const int pred_filter_search = cm->interp_filter == SWITCHABLE ?
+      (((mi_row + mi_col) >> bsl) + get_chessboard_index(cm)) % 2 : 0;
   int const_motion[MAX_REF_FRAMES] = { 0 };
 
   // For speed 6, the result of interp filter is reused later in actual encoding