diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-20 11:37:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-20 11:37:57 +0200 |
commit | bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4 (patch) | |
tree | 3f563faaad1640b0d0df7c4ad832dcb931b58cc2 | |
parent | b074367405ca181d0dfa4a0bdd1782450088e242 (diff) | |
download | ffmpeg-bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4.tar.gz |
tests/checkasm/vp9dsp: Add () to protect macro arguments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | tests/checkasm/vp9dsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/checkasm/vp9dsp.c b/tests/checkasm/vp9dsp.c index f64b48a822..146a71fbb5 100644 --- a/tests/checkasm/vp9dsp.c +++ b/tests/checkasm/vp9dsp.c @@ -102,7 +102,7 @@ static void check_ipred(void) ((uint16_t *)buf0)[(a) + (b) * jstride] = c; \ } \ } while (0) -#define setdx(a,b,c,d) setpx(a,b,c-(d)+(rnd()%((d)*2+1))) +#define setdx(a,b,c,d) setpx(a,b,(c)-(d)+(rnd()%((d)*2+1))) #define setsx(a,b,c,d) setdx(a,b,c,(d) << (bit_depth - 8)) #define randomize_buffers(bidx, lineoff, str) \ do { \ @@ -220,7 +220,7 @@ static void check_loopfilter() randomize_buffers(0, 0, 16); randomize_buffers(1, 8, 16); memcpy(buf1 - midoff, buf0 - midoff, 16 * 16 * SIZEOF_PIXEL); -#define M(a) ((a[1] << 8) | a[0]) +#define M(a) (((a)[1] << 8) | (a)[0]) call_ref(buf0, 16 * SIZEOF_PIXEL, M(E), M(I), M(H)); call_new(buf1, 16 * SIZEOF_PIXEL, M(E), M(I), M(H)); if (memcmp(buf0 - midoff, buf1 - midoff, 16 * 16 * SIZEOF_PIXEL)) |