ref: f71e5246f214353fea1d14a1d10fcc38859db58d
parent: 3971fab3e5f4e9f1b755ecd0c4d898e66afd73d6
parent: ae64e7b408b32a8c6c3ce94c1811b6c47d884a48
author: Scott LaVarnway <slavarnway@google.com>
date: Fri Apr 19 03:19:14 EDT 2013
Merge "Removed shadow warnings : postproc.c decodframe.c threading.c"
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -439,18 +439,17 @@
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;
@@ -457,11 +456,11 @@
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 @@
* 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 @@
* 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_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 @@
}
}
-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;
}
}
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -1365,11 +1365,11 @@
#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
--- a/vp8/decoder/threading.c
+++ b/vp8/decoder/threading.c
@@ -343,7 +343,6 @@
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;
--- a/vp8/encoder/denoising.c
+++ b/vp8/encoder/denoising.c
@@ -206,8 +206,6 @@
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;