]> granicus.if.org Git - libvpx/commitdiff
Replace mi_width_log2() with mi_width_log2_lookup table
authorJingning Han <jingning@google.com>
Tue, 7 Oct 2014 19:45:25 +0000 (12:45 -0700)
committerJingning Han <jingning@google.com>
Tue, 7 Oct 2014 19:45:25 +0000 (12:45 -0700)
Change-Id: If0ea98aa139d14d40cd924114e18396aff36b5a5

vp9/common/vp9_blockd.h
vp9/common/vp9_onyxc_int.h
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_pickmode.c
vp9/encoder/vp9_rdopt.c

index 01de4aa6530af245173f39506c607468008735d5..2436694c978a30f277c7da8343d29aa02d406e6b 100644 (file)
@@ -111,10 +111,6 @@ typedef enum {
   MAX_REF_FRAMES = 4
 } MV_REFERENCE_FRAME;
 
-static INLINE int mi_width_log2(BLOCK_SIZE sb_type) {
-  return mi_width_log2_lookup[sb_type];
-}
-
 // This structure now relates to 8x8 block regions.
 typedef struct {
   // Common for both INTER and INTRA blocks
index eeaff7fb90f630e1d19327c18cd9a8b371384fef..c28f156ab15fa95472e92204031a725168e1e20a 100644 (file)
@@ -329,7 +329,7 @@ static INLINE int partition_plane_context(const MACROBLOCKD *xd,
   const PARTITION_CONTEXT *above_ctx = xd->above_seg_context + mi_col;
   const PARTITION_CONTEXT *left_ctx = xd->left_seg_context + (mi_row & MI_MASK);
 
-  const int bsl = mi_width_log2(bsize);
+  const int bsl = mi_width_log2_lookup[bsize];
   const int bs = 1 << bsl;
   int above = 0, left = 0, i;
 
index 6183f1fe292998282db0cd01492d2cd73b4ef669..c0e36295a31643a6ff4c51c8c0e18894e174576a 100644 (file)
@@ -1956,7 +1956,7 @@ static void auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
   int bh, bw;
   BLOCK_SIZE min_size = BLOCK_32X32;
   BLOCK_SIZE max_size = BLOCK_8X8;
-  int bsl = mi_width_log2(BLOCK_64X64);
+  int bsl = mi_width_log2_lookup[BLOCK_64X64];
   const int search_range_ctrl = (((mi_row + mi_col) >> bsl) +
                        get_chessboard_index(cm->current_video_frame)) & 0x1;
   // Trap case where we do not have a prediction.
index 9abc9d1fb5953728dfcb1809910a07a511d56b83..fc73cfaf1e31b2b3763e60cbf2584728e749b404 100644 (file)
@@ -492,7 +492,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
   const int *const rd_threshes = cpi->rd.threshes[segment_id][bsize];
   const int *const rd_thresh_freq_fact = cpi->rd.thresh_freq_fact[bsize];
   INTERP_FILTER filter_ref = cm->interp_filter;
-  const int bsl = mi_width_log2(bsize);
+  const int bsl = mi_width_log2_lookup[bsize];
   const int pred_filter_search = cm->interp_filter == SWITCHABLE ?
       (((mi_row + mi_col) >> bsl) +
        get_chessboard_index(cm->current_video_frame)) & 0x1 : 0;
index b3dfbb05801a7eb8189750479037c16f27b56532..ac1c9d4c242daff92a716db0db99c407614e1aac 100644 (file)
@@ -3096,7 +3096,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
                                 tile->mi_col_end - mi_col);
       const int mi_height = MIN(num_8x8_blocks_high_lookup[bsize],
                                 tile->mi_row_end - mi_row);
-      const int bsl = mi_width_log2(bsize);
+      const int bsl = mi_width_log2_lookup[bsize];
       int cb_partition_search_ctrl = (((mi_row + mi_col) >> bsl)
           + get_chessboard_index(cm->current_video_frame)) & 0x1;
       MB_MODE_INFO *ref_mbmi;