Commit 925bd174 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/tta: fix macro ()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f2407407
...@@ -312,7 +312,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data, ...@@ -312,7 +312,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
filter->shift, filter->round); filter->shift, filter->round);
// fixed order prediction // 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) { switch (s->bps) {
case 1: *p += PRED(*predictor, 4); break; case 1: *p += PRED(*predictor, 4); break;
case 2: case 2:
......
...@@ -144,7 +144,7 @@ static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ...@@ -144,7 +144,7 @@ static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
} }
temp = value; 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) { switch (s->bps) {
case 1: value -= PRED(c->predictor, 4); break; case 1: value -= PRED(c->predictor, 4); break;
case 2: case 2:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment