From 007547b2820fba443b94484a75fbfdefee896729 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Jun 2014 15:26:18 +0200 Subject: [PATCH] avcodec: fix () in TRANSPOSE macro Signed-off-by: Michael Niedermayer --- libavcodec/vc1dec.c | 2 +- libavcodec/vp3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 4c05be937c..08bd36acad 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5578,7 +5578,7 @@ av_cold void ff_vc1_init_transposed_scantables(VC1Context *v) { int i; for (i = 0; i < 64; i++) { -#define transpose(x) ((x >> 3) | ((x & 7) << 3)) +#define transpose(x) (((x) >> 3) | (((x) & 7) << 3)) v->zz_8x8[0][i] = transpose(ff_wmv1_scantable[0][i]); v->zz_8x8[1][i] = transpose(ff_wmv1_scantable[1][i]); v->zz_8x8[2][i] = transpose(ff_wmv1_scantable[2][i]); diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 1783041c20..354be087ba 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1740,7 +1740,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) ff_vp3dsp_init(&s->vp3dsp, avctx->flags); for (i = 0; i < 64; i++) { -#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3) +#define TRANSPOSE(x) (((x) >> 3) | (((x) & 7) << 3)) s->idct_permutation[i] = TRANSPOSE(i); s->idct_scantable[i] = TRANSPOSE(ff_zigzag_direct[i]); #undef TRANSPOSE