Removed shadow warnings : mcomp.c rdopt.c

Adding -Wshadow to CFLAGS generated a bunch of warnings.  This patch
removes these warnings.

Change-Id: Ib498de4b8652051d257cf86dcb40d2968a5013ae
This commit is contained in:
Scott LaVarnway 2013-03-14 14:23:13 -07:00
parent f77140b7b4
commit 5d79720d57
2 changed files with 15 additions and 16 deletions

View File

@ -233,7 +233,7 @@ int vp8_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
#if ARCH_X86 || ARCH_X86_64 #if ARCH_X86 || ARCH_X86_64
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
unsigned char *y0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col; unsigned char *y_0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col;
unsigned char *y; unsigned char *y;
int buf_r1, buf_r2, buf_c1; int buf_r1, buf_r2, buf_c1;
@ -244,7 +244,7 @@ int vp8_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
y_stride = 32; y_stride = 32;
/* Copy to intermediate buffer before searching. */ /* Copy to intermediate buffer before searching. */
vfp->copymem(y0 - buf_c1 - pre_stride*buf_r1, pre_stride, xd->y_buf, y_stride, 16+buf_r1+buf_r2); vfp->copymem(y_0 - buf_c1 - pre_stride*buf_r1, pre_stride, xd->y_buf, y_stride, 16+buf_r1+buf_r2);
y = xd->y_buf + y_stride*buf_r1 +buf_c1; y = xd->y_buf + y_stride*buf_r1 +buf_c1;
#else #else
unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col; unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col;
@ -375,12 +375,12 @@ int vp8_find_best_sub_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
#if ARCH_X86 || ARCH_X86_64 #if ARCH_X86 || ARCH_X86_64
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
unsigned char *y0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col; unsigned char *y_0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col;
unsigned char *y; unsigned char *y;
y_stride = 32; y_stride = 32;
/* Copy 18 rows x 32 cols area to intermediate buffer before searching. */ /* Copy 18 rows x 32 cols area to intermediate buffer before searching. */
vfp->copymem(y0 - 1 - pre_stride, pre_stride, xd->y_buf, y_stride, 18); vfp->copymem(y_0 - 1 - pre_stride, pre_stride, xd->y_buf, y_stride, 18);
y = xd->y_buf + y_stride + 1; y = xd->y_buf + y_stride + 1;
#else #else
unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col; unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col;
@ -686,12 +686,12 @@ int vp8_find_best_half_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
#if ARCH_X86 || ARCH_X86_64 #if ARCH_X86 || ARCH_X86_64
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
unsigned char *y0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col; unsigned char *y_0 = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col;
unsigned char *y; unsigned char *y;
y_stride = 32; y_stride = 32;
/* Copy 18 rows x 32 cols area to intermediate buffer before searching. */ /* Copy 18 rows x 32 cols area to intermediate buffer before searching. */
vfp->copymem(y0 - 1 - pre_stride, pre_stride, xd->y_buf, y_stride, 18); vfp->copymem(y_0 - 1 - pre_stride, pre_stride, xd->y_buf, y_stride, 18);
y = xd->y_buf + y_stride + 1; y = xd->y_buf + y_stride + 1;
#else #else
unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col; unsigned char *y = base_pre + d->offset + (bestmv->as_mv.row) * pre_stride + bestmv->as_mv.col;

View File

@ -884,8 +884,8 @@ static void rd_pick_intra_mbuv_mode(MACROBLOCK *x, int *rate,
for (mode = DC_PRED; mode <= TM_PRED; mode++) for (mode = DC_PRED; mode <= TM_PRED; mode++)
{ {
int rate; int this_rate;
int distortion; int this_distortion;
int this_rd; int this_rd;
xd->mode_info_context->mbmi.uv_mode = mode; xd->mode_info_context->mbmi.uv_mode = mode;
@ -907,17 +907,17 @@ static void rd_pick_intra_mbuv_mode(MACROBLOCK *x, int *rate,
vp8_quantize_mbuv(x); vp8_quantize_mbuv(x);
rate_to = rd_cost_mbuv(x); rate_to = rd_cost_mbuv(x);
rate = rate_to + x->intra_uv_mode_cost[xd->frame_type][xd->mode_info_context->mbmi.uv_mode]; this_rate = rate_to + x->intra_uv_mode_cost[xd->frame_type][xd->mode_info_context->mbmi.uv_mode];
distortion = vp8_mbuverror(x) / 4; this_distortion = vp8_mbuverror(x) / 4;
this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion); this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
if (this_rd < best_rd) if (this_rd < best_rd)
{ {
best_rd = this_rd; best_rd = this_rd;
d = distortion; d = this_distortion;
r = rate; r = this_rate;
*rate_tokenonly = rate_to; *rate_tokenonly = rate_to;
mode_selected = mode; mode_selected = mode;
} }
@ -1294,12 +1294,11 @@ static void rd_check_segment(VP8_COMP *cpi, MACROBLOCK *x,
if (bestsme < INT_MAX) if (bestsme < INT_MAX)
{ {
int distortion; int disto;
unsigned int sse; unsigned int sse;
cpi->find_fractional_mv_step(x, c, e, &mode_mv[NEW4X4], cpi->find_fractional_mv_step(x, c, e, &mode_mv[NEW4X4],
bsi->ref_mv, x->errorperbit, v_fn_ptr, x->mvcost, bsi->ref_mv, x->errorperbit, v_fn_ptr, x->mvcost,
&distortion, &sse); &disto, &sse);
} }
} /* NEW4X4 */ } /* NEW4X4 */