[FFmpeg-cvslog] avcodec/wavpack: fix () in macros

Michael Niedermayer git at videolan.org
Wed Jun 18 03:21:32 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 18 02:54:57 2014 +0200| [28bf11150346cede3a65f5a00e12cc265e0ccd5a] | committer: Michael Niedermayer

avcodec/wavpack: fix () in macros

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/wavpack.c |    2 +-
 libavcodec/wavpack.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index a2d82e6..7c60f78 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 081b7f7..3a3e8db 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) \



More information about the ffmpeg-cvslog mailing list