summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-05-13 16:39:17 +0100
committerRonald S. Bultje <rsbultje@gmail.com>2011-05-13 16:45:24 -0400
commit1550f45a8928f31c48f770b5ddf860c99a57687e (patch)
treeed16b9464a7955f6ed9e460e7127ebdfe360d394 /libavcodec/vp8.c
parent2c9a5172d328259c5d76e588f2ddc12f439ffcd0 (diff)
Add av_clip_uintp2() function
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index dc7eb2121a..38f38b7cb3 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1329,9 +1329,7 @@ static av_always_inline void filter_level_for_mb(VP8Context *s, VP8Macroblock *m
filter_level += s->lf_delta.mode[mb->mode];
}
-/* Like av_clip for inputs 0 and max, where max is equal to (2^n-1) */
-#define POW2CLIP(x,max) (((x) & ~max) ? (-(x))>>31 & max : (x));
- filter_level = POW2CLIP(filter_level, 63);
+ filter_level = av_clip_uintp2(filter_level, 6);
interior_limit = filter_level;
if (s->filter.sharpness) {