aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_idet.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-21 01:49:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-21 01:58:07 +0100
commitdc9edb06b011c2999b59065542332ad6ece80647 (patch)
tree694c7af3aa8b1a506059ead66d8a95d34d96d9d1 /libavfilter/vf_idet.c
parent9ed6af4be2c6d7ac5f22f3f6f20493f1d49abbfe (diff)
downloadffmpeg-dc9edb06b011c2999b59065542332ad6ece80647.tar.gz
vf_idet: Fix macro arguments sideeffect
Fixes valgrind errors should improve detection scores Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_idet.c')
-rw-r--r--libavfilter/vf_idet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 513a8e397a..6fa969905c 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -83,7 +83,8 @@ static int filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, i
int ret=0;
for(x=0; x<w; x++){
- ret += FFABS((*a++ + *c++) - 2 * *b++);
+ int v = (*a++ + *c++) - 2 * *b++;
+ ret += FFABS(v);
}
return ret;
@@ -95,7 +96,8 @@ static int filter_line_c_16bit(const uint16_t *a, const uint16_t *b, const uint1
int ret=0;
for(x=0; x<w; x++){
- ret += FFABS((*a++ + *c++) - 2 * *b++);
+ int v = (*a++ + *c++) - 2 * *b++;
+ ret += FFABS(v);
}
return ret;