aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_fieldmatch.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-17 00:49:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-17 00:49:32 +0100
commit2bae7b337030de21c1a75cc300e4e54a0f142223 (patch)
treee937e02c421b60dd77d146f0133bcc03b7d8d881 /libavfilter/vf_fieldmatch.c
parentf15c734be1650cee240cd65b0dbd31fe6993a5bc (diff)
downloadffmpeg-2bae7b337030de21c1a75cc300e4e54a0f142223.tar.gz
avfilter/vf_fieldmatch: Add () to protect the arguments of the HAS_FF_AROUND() macro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fieldmatch.c')
-rw-r--r--libavfilter/vf_fieldmatch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 358bd9ee5b..54fd16bee4 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -285,9 +285,9 @@ static int calc_combed_score(const FieldMatchContext *fm, const AVFrame *src)
cmkpV += cmk_linesizeUV;
cmkpU += cmk_linesizeUV;
for (x = 1; x < width - 1; x++) {
-#define HAS_FF_AROUND(p, lz) (p[x-1 - lz] == 0xff || p[x - lz] == 0xff || p[x+1 - lz] == 0xff || \
- p[x-1 ] == 0xff || p[x+1 ] == 0xff || \
- p[x-1 + lz] == 0xff || p[x + lz] == 0xff || p[x+1 + lz] == 0xff)
+#define HAS_FF_AROUND(p, lz) (p[(x)-1 - (lz)] == 0xff || p[(x) - (lz)] == 0xff || p[(x)+1 - (lz)] == 0xff || \
+ p[(x)-1 ] == 0xff || p[(x)+1 ] == 0xff || \
+ p[(x)-1 + (lz)] == 0xff || p[(x) + (lz)] == 0xff || p[(x)+1 + (lz)] == 0xff)
if ((cmkpV[x] == 0xff && HAS_FF_AROUND(cmkpV, cmk_linesizeUV)) ||
(cmkpU[x] == 0xff && HAS_FF_AROUND(cmkpU, cmk_linesizeUV))) {
((uint16_t*)cmkp)[x] = 0xffff;