[FFmpeg-cvslog] avcodec/tta: fix macro ()
Michael Niedermayer
git at videolan.org
Sat Jun 7 18:18:21 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 7 17:43:52 2014 +0200| [925bd174f20371dee37542291c77fee1ba3e155d] | committer: Michael Niedermayer
avcodec/tta: fix macro ()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=925bd174f20371dee37542291c77fee1ba3e155d
---
libavcodec/tta.c | 2 +-
libavcodec/ttaenc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 87bfe7b..5fdbac8 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -312,7 +312,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
filter->shift, filter->round);
// fixed order prediction
-#define PRED(x, k) (int32_t)((((uint64_t)x << k) - x) >> k)
+#define PRED(x, k) (int32_t)((((uint64_t)(x) << (k)) - (x)) >> (k))
switch (s->bps) {
case 1: *p += PRED(*predictor, 4); break;
case 2:
diff --git a/libavcodec/ttaenc.c b/libavcodec/ttaenc.c
index 75d1664..ccd41a9 100644
--- a/libavcodec/ttaenc.c
+++ b/libavcodec/ttaenc.c
@@ -144,7 +144,7 @@ static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
temp = value;
-#define PRED(x, k) (int32_t)((((uint64_t)x << k) - x) >> k)
+#define PRED(x, k) (int32_t)((((uint64_t)(x) << (k)) - (x)) >> (k))
switch (s->bps) {
case 1: value -= PRED(c->predictor, 4); break;
case 2:
More information about the ffmpeg-cvslog
mailing list