[FFmpeg-cvslog] VP8: slightly faster loopfilter sharpness logic

Jason Garrett-Glaser git
Sun Feb 6 21:08:53 CET 2011


ffmpeg | branch: master | Jason Garrett-Glaser <jason at x264.com> | Thu Feb  3 23:37:30 2011 -0800| [e9266a2be04ea505285e32e411ef6120e9cbeba4] | committer: Michael Niedermayer

VP8: slightly faster loopfilter sharpness logic
(cherry picked from commit 8a2c99b48688008dd0a01c4826161ad4f7c25436)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9266a2be04ea505285e32e411ef6120e9cbeba4
---

 libavcodec/vp8.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index dce090f..b10330a 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);




More information about the ffmpeg-cvslog mailing list