]> granicus.if.org Git - libvpx/commitdiff
decoder speedup - get-segment-id only if segmentation enabled
authorJim Bankoski <jimbankoski@google.com>
Tue, 9 Jul 2013 15:52:30 +0000 (08:52 -0700)
committerJim Bankoski <jimbankoski@google.com>
Tue, 9 Jul 2013 15:52:30 +0000 (08:52 -0700)
Change-Id: I9355f8446660aeb7dfdbc5ee56635c791ac35e95

vp9/decoder/vp9_decodemv.c

index 875561b46e4b112e72cfecc40139dcc0e460e6b6..75bd1d1bc0701d3a90a9c6b837bfba9fbdf072f9 100644 (file)
@@ -367,13 +367,14 @@ static int read_inter_segment_id(VP9D_COMP *pbi, int mi_row, int mi_col,
   VP9_COMMON *const cm = &pbi->common;
   MACROBLOCKD *const xd = &pbi->mb;
   const BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
-  const int pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map,
-                                                 bsize, mi_row, mi_col);
+  int pred_segment_id;
   int segment_id;
 
   if (!xd->segmentation_enabled)
     return 0;  // Default for disabled segmentation
 
+  pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map,
+                                                   bsize, mi_row, mi_col);
   if (!xd->update_mb_segmentation_map)
     return pred_segment_id;