From ba625dd8a12b8f440af7f50c833e5c1005d67c85 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 21 Apr 2015 22:28:21 -0300 Subject: avcodec: use av_mod_uintp2() where useful Reviewed-by: Michael Niedermayer Signed-off-by: James Almer --- libavcodec/ffv1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/ffv1.h') 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); } -- cgit v1.1