From 8a2c99b48688008dd0a01c4826161ad4f7c25436 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Thu, 3 Feb 2011 23:37:30 -0800 Subject: [PATCH] VP8: slightly faster loopfilter sharpness logic --- libavcodec/vp8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index dce090f3e0..b10330af03 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1487,7 +1487,7 @@ static av_always_inline void filter_level_for_mb(VP8Context *s, VP8Macroblock *m interior_limit = filter_level; if (s->filter.sharpness) { - interior_limit >>= s->filter.sharpness > 4 ? 2 : 1; + interior_limit >>= (s->filter.sharpness + 3) >> 2; interior_limit = FFMIN(interior_limit, 9 - s->filter.sharpness); } interior_limit = FFMAX(interior_limit, 1);