ref: 865ca76604ac4589d444a418b2523b00b4c4548e
parent: 82f59351116976867fe18a41aaeb2dab88d1b6d7
parent: 6591cf2f7eae998e760b9d282a33c69d189f75e1
author: Jim Bankoski <[email protected]>
date: Wed Jul 10 10:39:39 EDT 2013
Merge "remove warnings when NDEBUG is set"
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -391,10 +391,9 @@
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)
--- a/vp9/common/vp9_entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -85,7 +85,7 @@
#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;
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -365,17 +365,16 @@
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
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -629,7 +629,7 @@
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)
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -324,9 +324,8 @@
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 @@
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 @@
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 @@
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);
}
}
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -478,8 +478,8 @@
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,18 +551,18 @@
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));
@@ -569,8 +569,7 @@
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) {