[FFmpeg-cvslog] tests/checkasm/vp9dsp: Add () to protect macro arguments

Michael Niedermayer git at videolan.org
Sun Sep 20 11:47:07 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Sep 20 11:37:57 2015 +0200| [bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4] | committer: Michael Niedermayer

tests/checkasm/vp9dsp: Add () to protect macro arguments

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4
---

 tests/checkasm/vp9dsp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/checkasm/vp9dsp.c b/tests/checkasm/vp9dsp.c
index f64b48a..146a71f 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))



More information about the ffmpeg-cvslog mailing list