]> granicus.if.org Git - libvpx/commitdiff
remove warnings when NDEBUG is set
authorJim Bankoski <jimbankoski@google.com>
Wed, 10 Jul 2013 21:27:20 +0000 (14:27 -0700)
committerJim Bankoski <jimbankoski@google.com>
Wed, 10 Jul 2013 21:27:20 +0000 (14:27 -0700)
Change-Id: Ie0cb732fdcb98616a422c4463bff80642248d136

vp9/common/vp9_blockd.h
vp9/common/vp9_entropymv.c
vp9/common/vp9_reconinter.c
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_rdopt.c

index 7c7ae6db886dc7c533a6aebcbf3ce1967ebd5347..16244e025b38264cc1ef3227792ee6af0e43aa52 100644 (file)
@@ -391,10 +391,9 @@ static INLINE int partition_plane_context(MACROBLOCKD *xd,
 
 static BLOCK_SIZE_TYPE get_subsize(BLOCK_SIZE_TYPE bsize,
                                    PARTITION_TYPE partition) {
-  BLOCK_SIZE_TYPE subsize;
+  BLOCK_SIZE_TYPE subsize = bsize;
   switch (partition) {
     case PARTITION_NONE:
-      subsize = bsize;
       break;
     case PARTITION_HORZ:
       if (bsize == BLOCK_SIZE_SB64X64)
index a62fa476a1db990cbc4d510b1a94eda5d5885293..50e8463f67131a6ad13e420b02b879c6bf4dbb5f 100644 (file)
@@ -85,7 +85,7 @@ const nmv_context vp9_default_nmv_context = {
 #define mv_class_base(c) ((c) ? (CLASS0_SIZE << (c + 2)) : 0)
 
 MV_CLASS_TYPE vp9_get_mv_class(int z, int *offset) {
-  MV_CLASS_TYPE c;
+  MV_CLASS_TYPE c = MV_CLASS_0;
   if      (z < CLASS0_SIZE * 8)    c = MV_CLASS_0;
   else if (z < CLASS0_SIZE * 16)   c = MV_CLASS_1;
   else if (z < CLASS0_SIZE * 32)   c = MV_CLASS_2;
index f331a8f85f8231646c5a5d9bc0fde33b3ffbe75a..265a19ab152d1acc83827283ca6a23960f2bd400 100644 (file)
@@ -365,17 +365,16 @@ static void build_inter_predictors(int plane, int block,
   MACROBLOCKD * const xd = arg->xd;
   const int bwl = b_width_log2(bsize) - xd->plane[plane].subsampling_x;
   const int bhl = b_height_log2(bsize) - xd->plane[plane].subsampling_y;
-  const int bh = 4 << bhl, bw = 4 << bwl;
   const int x = 4 * (block & ((1 << bwl) - 1)), y = 4 * (block >> bwl);
   const int use_second_ref = xd->mode_info_context->mbmi.ref_frame[1] > 0;
   int which_mv;
 
-  assert(x < bw);
-  assert(y < bh);
+  assert(x < (4 << bwl));
+  assert(y < (4 << bhl));
   assert(xd->mode_info_context->mbmi.sb_type < BLOCK_SIZE_SB8X8 ||
-         4 << pred_w == bw);
+         4 << pred_w == (4 << bwl));
   assert(xd->mode_info_context->mbmi.sb_type < BLOCK_SIZE_SB8X8 ||
-         4 << pred_h == bh);
+         4 << pred_h == (4 << bhl));
 
   for (which_mv = 0; which_mv < 1 + use_second_ref; ++which_mv) {
     // source
index 6885c77dbf2dca6aaa42437a07678a28dbb6de6a..c36cf796cb7f2d6c86cb8e95dade858041e1c09f 100644 (file)
@@ -629,7 +629,7 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc,
   int bsl = b_width_log2(bsize);
   int bs = (1 << bsl) / 4;  // mode_info step for subsize
   int n;
-  PARTITION_TYPE partition;
+  PARTITION_TYPE partition = PARTITION_NONE;
   BLOCK_SIZE_TYPE subsize;
 
   if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
index ce81e05832430f880232c8ed61714fb4746d7ec2..9c04d8a7a724b680b79b4765c0833cf9e0287078 100644 (file)
@@ -324,9 +324,8 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
   int mb_mode_index = ctx->best_mode_index;
   const int mis = cpi->common.mode_info_stride;
   const int bh = 1 << mi_height_log2(bsize), bw = 1 << mi_width_log2(bsize);
-  const MB_PREDICTION_MODE mb_mode = mi->mbmi.mode;
 
-  assert(mb_mode < MB_MODE_COUNT);
+  assert(mi->mbmi.mode < MB_MODE_COUNT);
   assert(mb_mode_index < MAX_MODES);
   assert(mi->mbmi.ref_frame[0] < MAX_REF_FRAMES);
   assert(mi->mbmi.ref_frame[1] < MAX_REF_FRAMES);
@@ -1170,7 +1169,7 @@ static void rd_use_partition(VP9_COMP *cpi, MODE_INFO *m, TOKENEXTRA **tp,
   int mh = bh / 2;
   int bss = (1 << bsl) / 4;
   int i, pl;
-  PARTITION_TYPE partition;
+  PARTITION_TYPE partition = PARTITION_NONE;
   BLOCK_SIZE_TYPE subsize;
   ENTROPY_CONTEXT l[16 * MAX_MB_PLANE], a[16 * MAX_MB_PLANE];
   PARTITION_CONTEXT sl[8], sa[8];
@@ -1421,6 +1420,8 @@ static void rd_pick_partition(VP9_COMP *cpi, TOKENEXTRA **tp, int mi_row,
   int srate = INT_MAX;
   int64_t sdist = INT_MAX;
 
+  (void) *tp_orig;
+
   if (bsize < BLOCK_SIZE_SB8X8)
     if (xd->ab_index != 0) {
       *rate = 0;
@@ -1928,13 +1929,13 @@ static void reset_skip_txfm_size_b(VP9_COMP *cpi, MODE_INFO *mi, int mis,
   if (mbmi->txfm_size > txfm_max) {
     MACROBLOCK * const x = &cpi->mb;
     MACROBLOCKD * const xd = &x->e_mbd;
-    const int segment_id = mbmi->segment_id;
     const int ymbs = MIN(bh, cm->mi_rows - mi_row);
     const int xmbs = MIN(bw, cm->mi_cols - mi_col);
 
     xd->mode_info_context = mi;
     assert(
-        vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP) || get_skip_flag(mi, mis, ymbs, xmbs));
+        vp9_segfeature_active(xd, mbmi->segment_id, SEG_LVL_SKIP) ||
+        get_skip_flag(mi, mis, ymbs, xmbs));
     set_txfm_flag(mi, mis, ymbs, xmbs, txfm_max);
   }
 }
index e42b6a4b6e878bbbbac43c48b44281fdc4eb68f4..fbd437424fd458fd3f479905e8da5b0088bd78d0 100644 (file)
@@ -478,8 +478,8 @@ static void model_rd_for_sb_y_tx(VP9_COMP *cpi, BLOCK_SIZE_TYPE bsize,
                                  MACROBLOCK *x, MACROBLOCKD *xd,
                                  int *out_rate_sum, int64_t *out_dist_sum,
                                  int *out_skip) {
-  int t, j, k;
-  enum BlockSize bs;
+  int t = 4, j, k;
+  enum BlockSize bs = BLOCK_4X4;
   struct macroblock_plane *const p = &x->plane[0];
   struct macroblockd_plane *const pd = &xd->plane[0];
   const int bw = plane_block_width(bsize, pd);
@@ -551,26 +551,25 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
   int pt;
   int c = 0;
   int cost = 0;
-  const int16_t *scan, *nb;
+  const int16_t *scan = NULL, *nb;
   const int eob = xd->plane[plane].eobs[block];
   const int16_t *qcoeff_ptr = BLOCK_OFFSET(xd->plane[plane].qcoeff, block, 16);
   const int ref = mbmi->ref_frame[0] != INTRA_FRAME;
   unsigned int (*token_costs)[COEF_BANDS][PREV_COEF_CONTEXTS]
                     [MAX_ENTROPY_TOKENS] = mb->token_costs[tx_size][type][ref];
-  ENTROPY_CONTEXT above_ec, left_ec;
+  ENTROPY_CONTEXT above_ec = 0, left_ec = 0;
   TX_TYPE tx_type = DCT_DCT;
   const int segment_id = xd->mode_info_context->mbmi.segment_id;
-  int seg_eob;
+  int seg_eob = 0;
   uint8_t token_cache[1024];
-  const uint8_t * band_translate;
+  const uint8_t *band_translate = NULL;
 
   // Check for consistency of tx_size with mode info
   assert((!type && !plane) || (type && plane));
   if (type == PLANE_TYPE_Y_WITH_DC) {
     assert(xd->mode_info_context->mbmi.txfm_size == tx_size);
   } else {
-    TX_SIZE tx_size_uv = get_uv_tx_size(mbmi);
-    assert(tx_size == tx_size_uv);
+    assert(tx_size == get_uv_tx_size(mbmi));
   }
 
   switch (tx_size) {