aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-18 02:54:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-18 03:13:36 +0200
commit28bf11150346cede3a65f5a00e12cc265e0ccd5a (patch)
treed72ecc296c98f9950fa1a6ec0619e631480d7d4a
parentd9a61ae31e8c55badd581f241c6d8c15ef8a49ce (diff)
downloadffmpeg-28bf11150346cede3a65f5a00e12cc265e0ccd5a.tar.gz
avcodec/wavpack: fix () in macros
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/wavpack.c2
-rw-r--r--libavcodec/wavpack.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index a2d82e6c2e..7c60f78b66 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -83,7 +83,7 @@ typedef struct WavpackContext {
int ch_offset;
} WavpackContext;
-#define LEVEL_DECAY(a) ((a + 0x80) >> 8)
+#define LEVEL_DECAY(a) (((a) + 0x80) >> 8)
static av_always_inline int get_tail(GetBitContext *gb, int k)
{
diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h
index 081b7f714d..3a3e8dbd2e 100644
--- a/libavcodec/wavpack.h
+++ b/libavcodec/wavpack.h
@@ -99,8 +99,8 @@ typedef struct WvChannel {
// macros for manipulating median values
#define GET_MED(n) ((c->median[n] >> 4) + 1)
-#define DEC_MED(n) c->median[n] -= ((c->median[n] + (128 >> n) - 2) / (128 >> n)) * 2
-#define INC_MED(n) c->median[n] += ((c->median[n] + (128 >> n) ) / (128 >> n)) * 5
+#define DEC_MED(n) c->median[n] -= ((c->median[n] + (128 >> (n)) - 2) / (128 >> (n))) * 2
+#define INC_MED(n) c->median[n] += ((c->median[n] + (128 >> (n)) ) / (128 >> (n))) * 5
// macros for applying weight
#define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \