Removed shadow warnings : postproc.c decodframe.c threading.c

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

Change-Id: I434a9f4bfac9ad4ab7d2a67a35ef21e6636280da
This commit is contained in:
Scott LaVarnway 2013-03-14 14:45:23 -07:00
Родитель f77140b7b4
Коммит ae64e7b408
4 изменённых файлов: 41 добавлений и 45 удалений

Просмотреть файл

@ -439,29 +439,28 @@ static void fillrd(struct postproc_state *state, int q, int a)
char char_dist[300];
double sigma;
int ai = a, qi = q, i;
int i;
vp8_clear_system_state();
sigma = ai + .5 + .6 * (63 - qi) / 63.0;
sigma = a + .5 + .6 * (63 - q) / 63.0;
/* set up a lookup table of 256 entries that matches
* a gaussian distribution with sigma determined by q.
*/
{
double i;
int next, j;
next = 0;
for (i = -32; i < 32; i++)
{
int a = (int)(.5 + 256 * vp8_gaussian(sigma, 0, i));
const int v = (int)(.5 + 256 * vp8_gaussian(sigma, 0, i));
if (a)
if (v)
{
for (j = 0; j < a; j++)
for (j = 0; j < v; j++)
{
char_dist[next+j] = (char) i;
}
@ -544,12 +543,12 @@ void vp8_plane_add_noise_c(unsigned char *Start, char *noise,
* filled with the same color block.
*/
void vp8_blend_mb_inner_c (unsigned char *y, unsigned char *u, unsigned char *v,
int y1, int u1, int v1, int alpha, int stride)
int y_1, int u_1, int v_1, int alpha, int stride)
{
int i, j;
int y1_const = y1*((1<<16)-alpha);
int u1_const = u1*((1<<16)-alpha);
int v1_const = v1*((1<<16)-alpha);
int y1_const = y_1*((1<<16)-alpha);
int u1_const = u_1*((1<<16)-alpha);
int v1_const = v_1*((1<<16)-alpha);
y += 2*stride + 2;
for (i = 0; i < 12; i++)
@ -582,12 +581,12 @@ void vp8_blend_mb_inner_c (unsigned char *y, unsigned char *u, unsigned char *v,
* unblended to allow for other visualizations to be layered.
*/
void vp8_blend_mb_outer_c (unsigned char *y, unsigned char *u, unsigned char *v,
int y1, int u1, int v1, int alpha, int stride)
int y_1, int u_1, int v_1, int alpha, int stride)
{
int i, j;
int y1_const = y1*((1<<16)-alpha);
int u1_const = u1*((1<<16)-alpha);
int v1_const = v1*((1<<16)-alpha);
int y1_const = y_1*((1<<16)-alpha);
int u1_const = u_1*((1<<16)-alpha);
int v1_const = v_1*((1<<16)-alpha);
for (i = 0; i < 2; i++)
{
@ -646,12 +645,12 @@ void vp8_blend_mb_outer_c (unsigned char *y, unsigned char *u, unsigned char *v,
}
void vp8_blend_b_c (unsigned char *y, unsigned char *u, unsigned char *v,
int y1, int u1, int v1, int alpha, int stride)
int y_1, int u_1, int v_1, int alpha, int stride)
{
int i, j;
int y1_const = y1*((1<<16)-alpha);
int u1_const = u1*((1<<16)-alpha);
int v1_const = v1*((1<<16)-alpha);
int y1_const = y_1*((1<<16)-alpha);
int u1_const = u_1*((1<<16)-alpha);
int v1_const = v_1*((1<<16)-alpha);
for (i = 0; i < 4; i++)
{
@ -676,46 +675,46 @@ void vp8_blend_b_c (unsigned char *y, unsigned char *u, unsigned char *v,
}
}
static void constrain_line (int x0, int *x1, int y0, int *y1, int width, int height)
static void constrain_line (int x_0, int *x_1, int y_0, int *y_1, int width, int height)
{
int dx;
int dy;
if (*x1 > width)
if (*x_1 > width)
{
dx = *x1 - x0;
dy = *y1 - y0;
dx = *x_1 - x_0;
dy = *y_1 - y_0;
*x1 = width;
*x_1 = width;
if (dx)
*y1 = ((width-x0)*dy)/dx + y0;
*y_1 = ((width-x_0)*dy)/dx + y_0;
}
if (*x1 < 0)
if (*x_1 < 0)
{
dx = *x1 - x0;
dy = *y1 - y0;
dx = *x_1 - x_0;
dy = *y_1 - y_0;
*x1 = 0;
*x_1 = 0;
if (dx)
*y1 = ((0-x0)*dy)/dx + y0;
*y_1 = ((0-x_0)*dy)/dx + y_0;
}
if (*y1 > height)
if (*y_1 > height)
{
dx = *x1 - x0;
dy = *y1 - y0;
dx = *x_1 - x_0;
dy = *y_1 - y_0;
*y1 = height;
*y_1 = height;
if (dy)
*x1 = ((height-y0)*dx)/dy + x0;
*x_1 = ((height-y_0)*dx)/dy + x_0;
}
if (*y1 < 0)
if (*y_1 < 0)
{
dx = *x1 - x0;
dy = *y1 - y0;
dx = *x_1 - x_0;
dy = *y_1 - y_0;
*y1 = 0;
*y_1 = 0;
if (dy)
*x1 = ((0-y0)*dx)/dy + x0;
*x_1 = ((0-y_0)*dx)/dy + x_0;
}
}

Просмотреть файл

@ -1335,11 +1335,11 @@ int vp8_decode_frame(VP8D_COMP *pbi)
#if CONFIG_MULTITHREAD
if (pbi->b_multithreaded_rd && pc->multi_token_partition != ONE_PARTITION)
{
unsigned int i;
unsigned int thread;
vp8mt_decode_mb_rows(pbi, xd);
vp8_yv12_extend_frame_borders(yv12_fb_new);
for (i = 0; i < pbi->decoding_thread_count; ++i)
corrupt_tokens |= pbi->mb_row_di[i].mbd.corrupted;
for (thread = 0; thread < pbi->decoding_thread_count; ++thread)
corrupt_tokens |= pbi->mb_row_di[thread].mbd.corrupted;
}
else
#endif

Просмотреть файл

@ -343,7 +343,6 @@ static void mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd, int start_mb_row)
for (mb_row = start_mb_row; mb_row < pc->mb_rows; mb_row += (pbi->decoding_thread_count + 1))
{
int i;
int recon_yoffset, recon_uvoffset;
int mb_col;
int filter_level;

Просмотреть файл

@ -206,8 +206,6 @@ void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser,
MB_MODE_INFO saved_mbmi;
MACROBLOCKD *filter_xd = &x->e_mbd;
MB_MODE_INFO *mbmi = &filter_xd->mode_info_context->mbmi;
int mv_col;
int mv_row;
int sse_diff = zero_mv_sse - best_sse;
saved_mbmi = *mbmi;