From 5ba40c3c712fdd44b6eecd5499799fe96225a01b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 24 Sep 2015 18:33:11 +0200 Subject: tests/checkasm/vp9dsp: Revert first hunk of bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4 The change was wrong, also add a comment explaining it Found-by: BBB Signed-off-by: Michael Niedermayer --- tests/checkasm/vp9dsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/checkasm') diff --git a/tests/checkasm/vp9dsp.c b/tests/checkasm/vp9dsp.c index e94daf3518..eb9228a681 100644 --- a/tests/checkasm/vp9dsp.c +++ b/tests/checkasm/vp9dsp.c @@ -102,7 +102,9 @@ 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))) + +// c can be an assignment and must not be put under () +#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 { \ -- cgit v1.2.3