summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_yadif.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-01 13:00:15 +0100
committerwm4 <wm4@nowhere>2013-11-01 13:00:15 +0100
commitdd344b43e87ef5a24a4ba739821998605e38a015 (patch)
treec0066b9e73fbb6f7ba5a46fed65db9a3a53a9695 /video/filter/vf_yadif.c
parent2696148d64364b40e7b0d1d3de017d6afce4b43d (diff)
downloadmpv-dd344b43e87ef5a24a4ba739821998605e38a015.tar.bz2
mpv-dd344b43e87ef5a24a4ba739821998605e38a015.tar.xz
Enable -Wshadow
This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning.
Diffstat (limited to 'video/filter/vf_yadif.c')
-rw-r--r--video/filter/vf_yadif.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/filter/vf_yadif.c b/video/filter/vf_yadif.c
index b9a48c6da2..b53b1bf594 100644
--- a/video/filter/vf_yadif.c
+++ b/video/filter/vf_yadif.c
@@ -311,16 +311,16 @@ static void filter_line_c(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uint
int spatial_score= FFABS(cur[-refs-1] - cur[+refs-1]) + FFABS(c-e)
+ FFABS(cur[-refs+1] - cur[+refs+1]) - 1;
-#define CHECK(j)\
- { int score= FFABS(cur[-refs-1+j] - cur[+refs-1-j])\
+#define CHECK(x, j)\
+ { int score##x= FFABS(cur[-refs-1+j] - cur[+refs-1-j])\
+ FFABS(cur[-refs +j] - cur[+refs -j])\
+ FFABS(cur[-refs+1+j] - cur[+refs+1-j]);\
- if(score < spatial_score){\
- spatial_score= score;\
+ if(score##x < spatial_score){\
+ spatial_score= score##x;\
spatial_pred= (cur[-refs +j] + cur[+refs -j])>>1;\
- CHECK(-1) CHECK(-2) }} }}
- CHECK( 1) CHECK( 2) }} }}
+ CHECK(0, -1) CHECK(1, -2) }} }}
+ CHECK(0, 1) CHECK(1, 2) }} }}
if(p->mode<2){
int b= (prev2[-2*refs] + next2[-2*refs])>>1;