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/ffv1dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/ffv1dec.c') diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 78ba1bed79..fda3f09a4f 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -172,8 +172,7 @@ static av_always_inline void decode_line(FFV1Context *s, int w, if (sign) diff = -diff; - sample[1][x] = (predict(sample[1] + x, sample[0] + x) + diff) & - ((1 << bits) - 1); + sample[1][x] = av_mod_uintp2(predict(sample[1] + x, sample[0] + x) + diff, bits); } s->run_index = run_index; } -- cgit v1.2.3