summaryrefslogtreecommitdiff
path: root/vp8/common
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2013-03-14 10:55:58 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-03-14 10:55:58 -0700
commitf77140b7b4607ceeded730b9ed8438e471c53b8e (patch)
treeaa2673924954c207ebb7474bf21de18a5144f001 /vp8/common
parentfc6a190af40e4d10c55919471ef8d41133a4634b (diff)
parent60bbd43995da739e83113a6d125ed945f29efbbc (diff)
downloadlibvpx-f77140b7b4607ceeded730b9ed8438e471c53b8e.tar
libvpx-f77140b7b4607ceeded730b9ed8438e471c53b8e.tar.gz
libvpx-f77140b7b4607ceeded730b9ed8438e471c53b8e.tar.bz2
libvpx-f77140b7b4607ceeded730b9ed8438e471c53b8e.zip
Merge "Removed shadow warnings : loopfilter*.c"
Diffstat (limited to 'vp8/common')
-rw-r--r--vp8/common/loopfilter.c19
-rw-r--r--vp8/common/loopfilter_filters.c52
2 files changed, 35 insertions, 36 deletions
diff --git a/vp8/common/loopfilter.c b/vp8/common/loopfilter.c
index 8681b7a6a..19857a7e9 100644
--- a/vp8/common/loopfilter.c
+++ b/vp8/common/loopfilter.c
@@ -156,39 +156,38 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
continue;
}
- lvl_ref = lvl_seg;
-
/* INTRA_FRAME */
ref = INTRA_FRAME;
/* Apply delta for reference frame */
- lvl_ref += mbd->ref_lf_deltas[ref];
+ lvl_ref = lvl_seg + mbd->ref_lf_deltas[ref];
/* Apply delta for Intra modes */
mode = 0; /* B_PRED */
/* Only the split mode BPRED has a further special case */
- lvl_mode = lvl_ref + mbd->mode_lf_deltas[mode];
- lvl_mode = (lvl_mode > 0) ? (lvl_mode > 63 ? 63 : lvl_mode) : 0; /* clamp */
+ lvl_mode = lvl_ref + mbd->mode_lf_deltas[mode];
+ /* clamp */
+ lvl_mode = (lvl_mode > 0) ? (lvl_mode > 63 ? 63 : lvl_mode) : 0;
lfi->lvl[seg][ref][mode] = lvl_mode;
mode = 1; /* all the rest of Intra modes */
- lvl_mode = (lvl_ref > 0) ? (lvl_ref > 63 ? 63 : lvl_ref) : 0; /* clamp */
+ /* clamp */
+ lvl_mode = (lvl_ref > 0) ? (lvl_ref > 63 ? 63 : lvl_ref) : 0;
lfi->lvl[seg][ref][mode] = lvl_mode;
/* LAST, GOLDEN, ALT */
for(ref = 1; ref < MAX_REF_FRAMES; ref++)
{
- int lvl_ref = lvl_seg;
-
/* Apply delta for reference frame */
- lvl_ref += mbd->ref_lf_deltas[ref];
+ lvl_ref = lvl_seg + mbd->ref_lf_deltas[ref];
/* Apply delta for Inter modes */
for (mode = 1; mode < 4; mode++)
{
lvl_mode = lvl_ref + mbd->mode_lf_deltas[mode];
- lvl_mode = (lvl_mode > 0) ? (lvl_mode > 63 ? 63 : lvl_mode) : 0; /* clamp */
+ /* clamp */
+ lvl_mode = (lvl_mode > 0) ? (lvl_mode > 63 ? 63 : lvl_mode) : 0;
lfi->lvl[seg][ref][mode] = lvl_mode;
}
diff --git a/vp8/common/loopfilter_filters.c b/vp8/common/loopfilter_filters.c
index 8235f6e9f..1d51696ff 100644
--- a/vp8/common/loopfilter_filters.c
+++ b/vp8/common/loopfilter_filters.c
@@ -54,7 +54,7 @@ static void vp8_filter(signed char mask, uc hev, uc *op1,
{
signed char ps0, qs0;
signed char ps1, qs1;
- signed char vp8_filter, Filter1, Filter2;
+ signed char filter_value, Filter1, Filter2;
signed char u;
ps1 = (signed char) * op1 ^ 0x80;
@@ -63,35 +63,35 @@ static void vp8_filter(signed char mask, uc hev, uc *op1,
qs1 = (signed char) * oq1 ^ 0x80;
/* add outer taps if we have high edge variance */
- vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
- vp8_filter &= hev;
+ filter_value = vp8_signed_char_clamp(ps1 - qs1);
+ filter_value &= hev;
/* inner taps */
- vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
- vp8_filter &= mask;
+ filter_value = vp8_signed_char_clamp(filter_value + 3 * (qs0 - ps0));
+ filter_value &= mask;
/* save bottom 3 bits so that we round one side +4 and the other +3
* if it equals 4 we'll set to adjust by -1 to account for the fact
* we'd round 3 the other way
*/
- Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
- Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
+ Filter1 = vp8_signed_char_clamp(filter_value + 4);
+ Filter2 = vp8_signed_char_clamp(filter_value + 3);
Filter1 >>= 3;
Filter2 >>= 3;
u = vp8_signed_char_clamp(qs0 - Filter1);
*oq0 = u ^ 0x80;
u = vp8_signed_char_clamp(ps0 + Filter2);
*op0 = u ^ 0x80;
- vp8_filter = Filter1;
+ filter_value = Filter1;
/* outer tap adjustments */
- vp8_filter += 1;
- vp8_filter >>= 1;
- vp8_filter &= ~hev;
+ filter_value += 1;
+ filter_value >>= 1;
+ filter_value &= ~hev;
- u = vp8_signed_char_clamp(qs1 - vp8_filter);
+ u = vp8_signed_char_clamp(qs1 - filter_value);
*oq1 = u ^ 0x80;
- u = vp8_signed_char_clamp(ps1 + vp8_filter);
+ u = vp8_signed_char_clamp(ps1 + filter_value);
*op1 = u ^ 0x80;
}
@@ -162,7 +162,7 @@ static void vp8_mbfilter(signed char mask, uc hev,
uc *op2, uc *op1, uc *op0, uc *oq0, uc *oq1, uc *oq2)
{
signed char s, u;
- signed char vp8_filter, Filter1, Filter2;
+ signed char filter_value, Filter1, Filter2;
signed char ps2 = (signed char) * op2 ^ 0x80;
signed char ps1 = (signed char) * op1 ^ 0x80;
signed char ps0 = (signed char) * op0 ^ 0x80;
@@ -171,11 +171,11 @@ static void vp8_mbfilter(signed char mask, uc hev,
signed char qs2 = (signed char) * oq2 ^ 0x80;
/* add outer taps if we have high edge variance */
- vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
- vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
- vp8_filter &= mask;
+ filter_value = vp8_signed_char_clamp(ps1 - qs1);
+ filter_value = vp8_signed_char_clamp(filter_value + 3 * (qs0 - ps0));
+ filter_value &= mask;
- Filter2 = vp8_filter;
+ Filter2 = filter_value;
Filter2 &= hev;
/* save bottom 3 bits so that we round one side +4 and the other +3 */
@@ -188,8 +188,8 @@ static void vp8_mbfilter(signed char mask, uc hev,
/* only apply wider filter if not high edge variance */
- vp8_filter &= ~hev;
- Filter2 = vp8_filter;
+ filter_value &= ~hev;
+ Filter2 = filter_value;
/* roughly 3/7th difference across boundary */
u = vp8_signed_char_clamp((63 + Filter2 * 27) >> 7);
@@ -291,24 +291,24 @@ static signed char vp8_simple_filter_mask(uc blimit, uc p1, uc p0, uc q0, uc q1)
static void vp8_simple_filter(signed char mask, uc *op1, uc *op0, uc *oq0, uc *oq1)
{
- signed char vp8_filter, Filter1, Filter2;
+ signed char filter_value, Filter1, Filter2;
signed char p1 = (signed char) * op1 ^ 0x80;
signed char p0 = (signed char) * op0 ^ 0x80;
signed char q0 = (signed char) * oq0 ^ 0x80;
signed char q1 = (signed char) * oq1 ^ 0x80;
signed char u;
- vp8_filter = vp8_signed_char_clamp(p1 - q1);
- vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (q0 - p0));
- vp8_filter &= mask;
+ filter_value = vp8_signed_char_clamp(p1 - q1);
+ filter_value = vp8_signed_char_clamp(filter_value + 3 * (q0 - p0));
+ filter_value &= mask;
/* save bottom 3 bits so that we round one side +4 and the other +3 */
- Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
+ Filter1 = vp8_signed_char_clamp(filter_value + 4);
Filter1 >>= 3;
u = vp8_signed_char_clamp(q0 - Filter1);
*oq0 = u ^ 0x80;
- Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
+ Filter2 = vp8_signed_char_clamp(filter_value + 3);
Filter2 >>= 3;
u = vp8_signed_char_clamp(p0 + Filter2);
*op0 = u ^ 0x80;