summaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ffv1.h')
-rw-r--r--libavcodec/ffv1.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h
index 5081397..bfc4d71 100644
--- a/libavcodec/ffv1.h
+++ b/libavcodec/ffv1.h
@@ -143,7 +143,7 @@ static av_always_inline int fold(int diff, int bits)
diff = (int8_t)diff;
else {
diff += 1 << (bits - 1);
- diff &= (1 << bits) - 1;
+ diff = av_mod_uintp2(diff, bits);
diff -= 1 << (bits - 1);
}
OpenPOWER on IntegriCloud